﻿namespace JSM.DataStore
{
	/// <summary>
	/// Interface for a data store provider.
	/// </summary>
	public interface IDataStoreProvider
	{
		/// <summary>
		/// Sets the data to the data store.
		/// </summary>
		/// <param name="key">
		/// The key of the data.
		/// </param>
		/// <param name="value">
		/// The value of the data.
		/// </param>
		void SetData(string key, object value);

		/// <summary>
		/// Gets the data of the data store.
		/// </summary>
		/// <param name="key">
		/// The key of the data.
		/// </param>
		/// <returns>
		/// The data from the data store as <see cref="object"/>.
		/// </returns>
		object GetData(string key);

		/// <summary>
		/// Checks whether an data entry exists for the given key.
		/// </summary>
		/// <param name="key">
		/// The key of the data.
		/// </param>
		/// <returns>
		/// true if the data store contains data for the given key, otherwise false.
		/// </returns>
		bool ContainsData(string key);
	}
}
